package com.bao.work.generics03;

import java.util.Arrays;

/**
 * @author baoye
 * @date 2024-07-30/18:57
 */
public class Main {
    public static void main(String[] args) {
        String[] strings={"55","acb","454asc","aSV515"};
        System.out.println(Arrays.toString(strings));
        method(strings,0,3);
        System.out.println(Arrays.toString(strings));
    }

    public static<T> void method(T[] arr,int a,int b) {
        T temp=arr[a];
        arr[a]=arr[b];
        arr[b]=temp;
    }
}
